﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace Shuriken.Base
{
    public interface IApplicationService
    {
        bool ExecuteCommand(string subject, string action);
        bool ExecuteCommand(string subject, string action, string attribute);
    }

    public class ApplicationServiceHost
    {
        private static IApplicationService m_appService = null; 
        public static void InitializeService(IApplicationService appService)
        {
            m_appService = appService; 
        }

        public static IApplicationService DefaultInstance
        {
            get
            {
                if (m_appService == null)
                {
                    throw new Exception("Application service host has not been initialized!");
                }

                return m_appService;
            }
        }

    }
}
